<script setup>
const props = defineProps({
    sex: {
        type: Number,
        require: true,
        default: "默认值",
    },
});
</script>
<template>
    <span v-if="sex === 2" class="man">♂</span>
    <span v-else class="woman">♀</span>
</template>
<style scoped>
.woman {
    color: red;
    font-size: 16px;
}
.man {
    color: blue;
    font-size: 16px;
}
</style>
